#!/usr/bin/python
# -*- coding: cp1250 -*-

from pepe.glib import *

def main(f):
    ''' strip empty space for each column 
        of delimited text file
    '''
    of = open(f + '.strip_columns.#', 'w')
    cd = ''
    for line in bt.lines(f):
        if cd == '': cd = findcoldelimiter(line)
        line = strip_txt_columns(line, cd)
        of.write(line)
    of.close()

if __name__ == "__main__":
    print '''
    strip columns
    '''
    if len(sys.argv) == 2:
        f = sys.argv[1]
        print 'strip columns: %s' % (f,)
        main(f)
    else:
        print 'wrong syntax, do better'